<div class="title">
  <h1>Listing units</h1>
</div>

<div class="content">

  <table>
    <tr>
      <th class="heading">Name</th>
      <th class="heading">Angriff</th>
      <th class="heading">Verteidigung</th>
      <th class="heading">Leben</th>
      <th class="heading">Geschwindigkeit</th>
      <th class="heading">Punkte</th>
      <th class="heading">Essenzen</th>
      <th class="heading">Kristalle</th>
      <th class="heading">Kraftsteine</th>
      <th class="heading">Goldharz</th>
      <th class="heading">Wächtereinheit</th>
    </tr>

    <% for unit in @units %>
      <tr>
        <td class="description"><%=n link_to unit.name, unit %></td>
        <td class="def" id="right"><%=n unit.angriff %></td>
        <td class="def" id="right"><%=n unit.verteidigung %></td>
        <td class="def" id="right"><%=n unit.leben %></td>
        <td class="def" id="right"><%=n unit.geschwindigkeit %></td>
        <td class="def" id="right"><%=n unit.punkte %></td>
        <td class="def" id="right"><%=n unit.essenzen %></td>
        <td class="def" id="right"><%=n unit.kristalle %></td>
        <td class="def" id="right"><%=n unit.kraftsteine %></td>
        <td class="def" id="right"><%=n unit.goldharz %></td>
        <td class="def" id="center"><%= unit.waechtereinheit ? 'ja' : 'nein' %></td>
        <td><%= link_to 'Edit', edit_unit_path(unit) %></td>
        <td><%= link_to 'Destroy', unit, :confirm => 'Are you sure?', :method => :delete %></td>
      </tr>
    <% end %>
  </table>

</div>

<% content_for :navigation do %>
  <li>
    <%= link_to 'Neue Einheit', new_unit_path %>
  </li>
  <li>
    <%= link_to 'Angriff', attacks_path %>
  </li>
<% end %>